package controller;

import java.util.ArrayList;
import java.util.List;



import util.HibernateUtil;
import model.ProfileFieldDefinition;

import com.opensymphony.xwork2.ActionSupport;

public class ProfileFieldDefinitionController extends ActionSupport {

	private static final long serialVersionUID = 1L;

	public ProfileFieldDefinition profileFieldDefinition  = new ProfileFieldDefinition();
	public List<Object> list = new ArrayList<Object>(); 
	public int id;
	
	public String create()
	{
		HibernateUtil.insert(profileFieldDefinition);
		list = HibernateUtil.list("from ProfileFieldDefinition");
		return SUCCESS;
	}
	
	public String delete()
	{
		HibernateUtil.delete(ProfileFieldDefinition.class, id);
		list = HibernateUtil.list("from ProfileFieldDefinition");
		return SUCCESS;
	}
	
	public String execute() {
		
		list = HibernateUtil.list("from ProfileFieldDefinition");
		return SUCCESS;
	}
	
}
